/*
 * @Descripttion: 
 * @Author: cuidm
 * @Date: 2022-03-31 14:58:28
 * @LastEditors: cuidm
 * @LastEditTime: 2022-09-30 13:36:49
 */
import React, { useState, useEffect } from "react";
import { Tabs } from "antd";
import { ProDescriptions } from '@ant-design/pro-components';
import { CmdbContent, HcpTipModal } from "@/components";

const ModelUniqueDetail = ({ info, visible, setVisible, }) => {
    const columns = [
        {
            title: "关系类型名称",
            key: "name",
            dataIndex: "name",
        },
        {
            title: "唯一标识",
            key: "associateTypeCode",
            dataIndex: "associateTypeCode",
        },
        {
            title: "源->目标描述",
            key: "srcToDestDesc",
            dataIndex: "srcToDestDesc",
        },
        {
            title: "目标->源描述",
            key: "destToSrcDesc",
            dataIndex: "destToSrcDesc",
        },
        {
            title: "使用数量",
            key: "useNum",
            dataIndex: "useNum",
        },
    ]
    return (
        <HcpTipModal
            title="关联类型详情"
            visible={visible}
            onCancel={() => { setVisible(false) }}
            onFinish={() => { setVisible(false) }}
            content={
                <>
                    <ProDescriptions
                        column={1}
                        dataSource={info}
                        columns={columns}
                        style={{padding: "20px"}}
                    >
                    </ProDescriptions>
                </>
            }
        />
    )
}

export default ModelUniqueDetail;